package hotel.switchs.oversea.biz.utils;

import net.sf.json.JSONException;
import net.sf.json.util.PropertySetStrategy;

/**
 * @Author lmf
 * @Date 2020/5/21 16:29
 * 自定义解析策略 自动过滤未使用属性
 **/
public class PropertyStrategyWrapper extends PropertySetStrategy {
    private PropertySetStrategy original;

    public PropertyStrategyWrapper(PropertySetStrategy original) {
        this.original = original;
    }

    @Override
    public void setProperty(Object o, String s, Object o1) throws JSONException {
        try {
            original.setProperty(o,s,o1);
        }catch (Exception ex){
            ex.printStackTrace();
        }
    }
}
